/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author owtee
 */
@Entity
@Table(name = "job_status_statement")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "JobStatusStatement.findAll", query = "SELECT j FROM JobStatusStatement j"),
    @NamedQuery(name = "JobStatusStatement.findByJobStatusId", query = "SELECT j FROM JobStatusStatement j WHERE j.jobStatusId = :jobStatusId"),
    @NamedQuery(name = "JobStatusStatement.findByCreateUser", query = "SELECT j FROM JobStatusStatement j WHERE j.createUser = :createUser"),
    @NamedQuery(name = "JobStatusStatement.findByCreateDate", query = "SELECT j FROM JobStatusStatement j WHERE j.createDate = :createDate"),
    @NamedQuery(name = "JobStatusStatement.findByModifyUser", query = "SELECT j FROM JobStatusStatement j WHERE j.modifyUser = :modifyUser"),
    @NamedQuery(name = "JobStatusStatement.findByModifyDate", query = "SELECT j FROM JobStatusStatement j WHERE j.modifyDate = :modifyDate")})
public class JobStatusStatement implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "Job_Status_Id")
    private Integer jobStatusId;
    @Size(max = 10)
    @Column(name = "Create_User")
    private String createUser;
    @Column(name = "Create_Date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    @Size(max = 10)
    @Column(name = "Modify_User")
    private String modifyUser;
    @Column(name = "Modify_Date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date modifyDate;
    @JoinColumn(name = "Status_Id", referencedColumnName = "Status_Id")
    @ManyToOne(optional = false)
    private JobStatus statusId;
    @JoinColumn(name = "Job_Id", referencedColumnName = "Job_Id")
    @ManyToOne(optional = false)
    private Jobs jobId;

    public JobStatusStatement() {
    }

    public JobStatusStatement(Integer jobStatusId) {
        this.jobStatusId = jobStatusId;
    }

    public Integer getJobStatusId() {
        return jobStatusId;
    }

    public void setJobStatusId(Integer jobStatusId) {
        this.jobStatusId = jobStatusId;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public JobStatus getStatusId() {
        return statusId;
    }

    public void setStatusId(JobStatus statusId) {
        this.statusId = statusId;
    }

    public Jobs getJobId() {
        return jobId;
    }

    public void setJobId(Jobs jobId) {
        this.jobId = jobId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (jobStatusId != null ? jobStatusId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JobStatusStatement)) {
            return false;
        }
        JobStatusStatement other = (JobStatusStatement) object;
        if ((this.jobStatusId == null && other.jobStatusId != null) || (this.jobStatusId != null && !this.jobStatusId.equals(other.jobStatusId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.JobStatusStatement[ jobStatusId=" + jobStatusId + " ]";
    }
    
}
